load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_fs",
    srcs = glob(
        ["src/**/*.rs"],
    ),
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:nix",
                "fbsource//third-party/rust:libc",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:nix",
                "fbsource//third-party/rust:libc",
            ],
        ),
        (
            "windows",
            [
                "fbsource//third-party/rust:common-path",
                "fbsource//third-party/rust:winapi",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:assert_matches",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tempfile",
    ],
    deps = [
        "fbsource//third-party/rust:compact_str",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:dunce",
        "fbsource//third-party/rust:memchr",
        "fbsource//third-party/rust:ref-cast",
        "fbsource//third-party/rust:relative-path",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:smallvec",
        "fbsource//third-party/rust:tokio",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_env:buck2_env",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/gazebo/gazebo:gazebo",
        "//buck2/gazebo/strong_hash:strong_hash",
        # @oss-disable[end= ]: "//common/rust/shed/detect_eden:detect_eden",
    ],
)
